package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ShangjiatuangouMapper;
import com.ruoyi.system.domain.Shangjiatuangou;
import com.ruoyi.system.service.IShangjiatuangouService;

/**
 * 商家团购活动Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-14
 */
@Service
public class ShangjiatuangouServiceImpl implements IShangjiatuangouService 
{
    @Autowired
    private ShangjiatuangouMapper shangjiatuangouMapper;

    /**
     * 查询商家团购活动
     * 
     * @param sjtgId 商家团购活动主键
     * @return 商家团购活动
     */
    @Override
    public Shangjiatuangou selectShangjiatuangouBySjtgId(Long sjtgId)
    {
        return shangjiatuangouMapper.selectShangjiatuangouBySjtgId(sjtgId);
    }

    /**
     * 查询商家团购活动列表
     * 
     * @param shangjiatuangou 商家团购活动
     * @return 商家团购活动
     */
    @Override
    public List<Shangjiatuangou> selectShangjiatuangouList(Shangjiatuangou shangjiatuangou)
    {
        return shangjiatuangouMapper.selectShangjiatuangouList(shangjiatuangou);
    }

    @Override
    public List<Shangjiatuangou> selectxiangxi(Shangjiatuangou shangjiatuangou) {
        return shangjiatuangouMapper.selectxiangxi(shangjiatuangou);
    }

    /**
     * 新增商家团购活动
     * 
     * @param shangjiatuangou 商家团购活动
     * @return 结果
     */
    @Override
    public int insertShangjiatuangou(Shangjiatuangou shangjiatuangou)
    {
        return shangjiatuangouMapper.insertShangjiatuangou(shangjiatuangou);
    }

    /**
     * 修改商家团购活动
     * 
     * @param shangjiatuangou 商家团购活动
     * @return 结果
     */
    @Override
    public int updateShangjiatuangou(Shangjiatuangou shangjiatuangou)
    {
        return shangjiatuangouMapper.updateShangjiatuangou(shangjiatuangou);
    }

    /**
     * 批量删除商家团购活动
     * 
     * @param sjtgIds 需要删除的商家团购活动主键
     * @return 结果
     */
    @Override
    public int deleteShangjiatuangouBySjtgIds(Long[] sjtgIds)
    {
        return shangjiatuangouMapper.deleteShangjiatuangouBySjtgIds(sjtgIds);
    }

    /**
     * 删除商家团购活动信息
     * 
     * @param sjtgId 商家团购活动主键
     * @return 结果
     */
    @Override
    public int deleteShangjiatuangouBySjtgId(Long sjtgId)
    {
        return shangjiatuangouMapper.deleteShangjiatuangouBySjtgId(sjtgId);
    }
}
